package mianshi;

/**
 * @author cyt
 * @create 2020-03-31 13:50
 */
public class Test {

    /***
     * 多态的实例
     * @param args
     */
    public static void main(String[] args) {
        // 定义一个父类的引用变量
        PeoPle peoPle = null;
        // 指向子类的对象
        peoPle = new Man();
        peoPle.say();
        // 指向子类的对象
        peoPle = new Woman();
        peoPle.say();
    }
}
